<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/img/icon.png">
<title>登录 - 捷腾体育后台管理系统</title>
<link rel="stylesheet" href="/admin/css/login.css">
</head>
<body class="body-login">
	<div class="login">
		<div class="login-img"><img src="/admin/img/login_logo.png"></div>
		<form class="login-form">
			<input type="text" class="login-form-input" id="name" name="name" placeholder="ID">
			<div class="login-form-hr"></div>
			<input type="password" class="login-form-pwd" id="pwd" name="pwd" placeholder="密码">
			<a href="javascript:;" class="login-form-btn" id="LoginBtn"></a>
		</form>
	</div>
</div>
<!--全局Js-开始-->
<!--JQ-->
<script type="text/javascript" src="/library/jquery/jquery.1.9.1.min.js"></script>
<!--Layer弹框-->
<script type="text/javascript" src="/library/layer/layer.js"></script>
<!--公共Js-->
<script type="text/javascript" src="/admin/js/main.js"></script>
<!--全局Js-结束-->
<script type="text/javascript">
//登录
$('#LoginBtn').click(function(event){
	event.preventDefault();
	var FormData=$('form').serialize()
	var name=$('#name').val()
	var pwd=$('#pwd').val()
	if(name==''){
		var info=PlaceholderText('#name')
		layer.msg('请填写'+info,{icon:2,offset:'10px'})
		$('#username').focus()
		return true;
	}
	if(pwd==''){
		var info=PlaceholderText('#pwd')
		layer.msg('请填写'+info,{icon:2,offset:'10px'})
		$('#pwd').focus()
		return true;
	}
	var ajax_data={
		api:'/adminapi/system/login',
		form_data:{name:name,pwd:pwd},
		tips:'登录成功',
		to_url:'/admin/home/index?page_id=2',
	}
	postData(ajax_data,function(data){
		if(data.id > 1&& !data.id_join){
			layer.msg('没有任何权限,请联系上级管理员',{icon:2,offset:'10px'})
		}
	})
})
//回车登录
Enter_Ajax('#pwd','#LoginBtn')
</script>
</body>
</html>
